package com.njlime.cms.repository.sys;

import com.njlime.cms.entities.MaterialsImage;
import com.njlime.cms.entities.MaterialsNews;
import com.njlime.core.helper.PageBean;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

/**
 * Created by Dean on 2017-7-27.
 */
public interface MaterialNewsDao extends JpaRepository<MaterialsNews, Integer>,JpaSpecificationExecutor<MaterialsNews> {


    public PageBean getNewsList(PageBean pageBean, int unitId, int groupId, String name);

    public void delNews(int id, int unitId);

    MaterialsNews get(int id, int unitId);

    /**
     * 图文分组
     * @param id 图文id
     * @param groupId 分组id
     * @param unitId 单位id
     */
    public void editNewsGroup(int id, int groupId, int unitId);

    public void editMediaId(Integer id, String mediaId,int unitId);


    public void update(MaterialsNews info);
}
